CC = gcc
CFLAGS = -g
LIBS = -lobjc

.SUFFIXES : .o .m

all: clear game editor

game: game.o Deamon.o Weapon.o
	$(CC) $(CFLAGS) -o game game.o Deamon.o Weapon.o $(LIBS)
game.o:
	$(CC) -c $(CFLAGS) game.m
Deamon.o:
	$(CC) -c $(CFLAGS) Deamon.m
Weapon.o:
	$(CC) -c $(CFLAGS) Weapon.m

editor: editor.o WeaponEditor.o
	$(CC) $(CFLAGS) -o editor editor.o WeaponEditor.o $(LIBS)

editor.o:
	$(CC) -c $(CFLAGS) editor.m

WeaponEditor.o: WeaponEditor.m
	$(CC) -c $(CFLAGS) WeaponEditor.m

clean: clear
clear:
	rm -f *.o *.exe
